﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MockupDesigner.AppItems.Commands
{
    public class NewCommand : ICommand
    {

        public CommandType CommandType
        {
            get { return CommandType.Irreversible; }
        }

        public void Execute(object target, params object[] parameters)
        {
            if (!(target is Window1))
            {
                throw new InvalidCastException("The target must be the Window");
            }
            Window1 window = (Window1)target;
            window.AddNewDocument();
        }

        public void Redo()
        {
            // Nothing to do
        }

        public void Undo()
        {
            // Nothing to do
        }
    }
}
